/**
 * Created by root on 16-12-29.
 */
jQuery(function () {
    table_num();
})


function modify(this_id) {
    var name = $(this_id).parent().parent().children("#td_name").text();
    var order = $(this_id).parent().parent().children("#td_order").text();
    var describe = $(this_id).parent().parent().children("#td_describe").text();
    var id = $(this_id).parent().parent().children("#td_id").text();

    $("[name='name']").val(name);
    $("[name='order']").val(order);
    $("[name='describe']").val(describe);
    $("[name='id']").val(id);
    $('#form').attr('action','/nav/configNav/modify');
    $("#add").text('修改');
}

function del(this_id) {
    var id = $(this_id).parent().parent().children("#td_id").text();
    var url = '/nav/configNav/delete';
    $.post({
        'url':url,
        'data':{id:id},
        'success':function (callback) {
            window.location.reload();
        }
    });

}